import request from '../utils/request'
// 列表渲染
export const Regional = (params) =>
  request({ url: '/api/vm-service/region/search', params })
// 新增
export const Regadd = (obj) => request.post('/api/vm-service/region', obj)
// 删除
export const Regedit = (id) => request.delete(`/api/vm-service/region/${id}`)
// 修改
export const Regmodify = (id, data) =>
  request.put(`/api/vm-service/region/${id}`, data)
// 区域详情
export const Regdetails = (params) =>
  request({ url: '/api/vm-service/node/search/', params })

// 合作商列表
export const PartnersList = (params) =>
  request({ url: 'api/user-service/partner/search', params })
// 删除合作商
export const Partnersedit = (id) =>
  request.delete(`/api/user-service/partner/${id}`)
// 重置合作商密码
export const Partnersemodify = (id) =>
  request.put(`/api/user-service/partner/resetPwd/${id}`)
// 新增合作商
export const Partneradd = (obj) =>
  request.post('/api/user-service/partner', obj)
// 修改合作商
export const Partnermodify = (id, data) =>
  request.put(`api/user-service/partner/${id}`, data)

// 点位列表
export const PointList = (params) =>
  request({ url: '/api/vm-service/node/search', params })
// 删除点位
export const Pointedit = (id) => request.delete(`/api/vm-service/node/${id}`)
// 新增点位
export const Pointadd = (data) => request.post('/api/vm-service/node', data)
export const PointPartnersList = (params) =>
  request({ url: '/api/vm-service/businessType', params })
// 修改
export const Pointmodify = (id, data) =>
  request.put(`/api/vm-service/node/${id}`, data)
// 查看详情
export const Poindetails = (id) =>
  request({ url: `/api/vm-service/node/vmList/${id}` })
